﻿package bdz.projects.lavender.opsm.main {
	import bdz.controls.VideoPlayback;
	import flash.display.*;
	import com.greensock.easing.*;
	import com.greensock.*;
	import flash.events.Event;
	import bdz.common.events.*;
	
	/**
	 * ...
	 * @author Donald
	 */
	public class OPSMVideo extends MovieClip {
		public var _currentDetails:MovieClip;
		private var _videoPlayback:VideoPlayback;
		function OPSMVideo() {
			addEventListener(Event.ADDED_TO_STAGE, initializeComponent);
		}
		private function createPlayback() {
			_videoPlayback = new VideoPlayback(615, 360);
			_videoPlayback.x = 0;
			_videoPlayback.y = 0;
			_videoPlayback.autoAlignControl = false;
			_videoPlayback.autoHideVolume = false;
			_videoPlayback.source = loaderInfo.parameters.source || "will.flv"; 
			addChild(_videoPlayback);
		}
		private function initializeComponent(evt:Event):void {
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			createPlayback();
		}
	}
	
}